package com.winit.schedule.job.tracker;

import java.util.Map;
import java.util.Set;

import com.winit.schedule.core.conf.Configuration;
import com.winit.schedule.core.event.Dispatcher;
import com.winit.schedule.core.repository.entity.TaskTrackerEntity;
import com.winit.schedule.job.tracker.monitor.TaskTrackerMonitor;
import com.winit.schedule.job.tracker.monitor.ZKServiceMonitor;
import com.winit.schedule.job.tracker.remoting.RemotingService;
import com.winit.schedule.job.tracker.repository.ConsoleDataManager;
import com.winit.schedule.job.tracker.repository.ScheduleDataManager;
import com.winit.schedule.job.tracker.schedule.TaskScheduleManager;
import com.winit.schedule.job.tracker.sms.SmsSender;
import com.winit.schedule.job.tracker.util.MailHelper;

public interface JobTrackerContext {

    Configuration getConf();

    JobTracker getJobTracker();

    Map<String, TaskTrackerEntity> getTaskTrackers();

    Set<TaskTrackerEntity> getDisconnectTaskTrackerSet();

    Dispatcher getDispatcher();
    
    Dispatcher getDataDispatcher();

    RemotingService getRemotingService();

    ScheduleDataManager getScheduleDataManager();

    ConsoleDataManager getConsoleDataManager();

    TaskTrackerMonitor getTaskTrackerMonitor();

    TaskScheduleManager getTaskScheduleManager();

    long getJobTrackerStartupTime();

    boolean allowAssignedTasks();

    String getJobTrackerUuid();

    void registerTaskTracker(TaskTrackerEntity taskTrackerEntity);

    void unregisterTaskTracker(TaskTrackerEntity taskTrackerEntity);

    MailHelper getMailHelper();

    ZKServiceMonitor getZkService();

    SmsSender getSmsSender();

}
